for cover in cover_list:
    for house_plan in house_plans:
        try:
            if cover.address == house_plan.address:
                output_folder = os.path.join(self.output_dir, cover.registration_number)
                if not os.path.exists(output_folder):
                    os.makedirs(output_folder)
                output_image_path = os.path.join(output_folder, '附图0001.jpg')
                # 假设house_plan包含获取分户图JPG文件路径的方法
                with Image.open(house_plan.image_path) as img:
                    img.save(output_image_path)
        except Exception as e:
            print(f"匹配地址错误: {e}")
            break  # 假设一个封面只匹配一个分户图

# 规范化解析文字
        (self._whole_strings_in_one_page, self._info_list_in_one_page) = formating_recognized_texts(
            recognized_line_list_in_one_page)

        print(self._whole_strings_in_one_page)

        self._address = extract_info('座落(.*)', self._whole_strings_in_one_page, [':', '：'])


#无效#########################################################################################################
rotated_img = image.rotate(90)
            # 计算新尺寸
            new_width = int(image.height)
            new_height = int(image.width)

            # 调整图像尺寸
            rotated_img = rotated_img.resize((new_width, new_height))